﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace BEELab
{
    public partial class MoveStage : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if ( Request.QueryString["ID"] == null || (Request.QueryString["ID"] != null && BEELab.Logic.ProgramManagement.StageManagement.StageManagement.GetOwnerID(int.Parse(Request.QueryString["ID"].ToString())) != int.Parse(Session["UserID"].ToString()) && (Session["Admin"] == null || (bool)Session["Admin"] == false)))
            {
                Response.Redirect("Main.aspx");
            }

            if (!IsPostBack && Request.QueryString["ID"] != null)
            {
                
            }
            else
            {
                literal1.Text = "<script>parent.$.fancybox.close(); window.parent.location.reload();    </script>";
            }
        }

        protected void Button3_Click(object sender, EventArgs e)
        {
            BEELab.Logic.ProgramManagement.StageManagement.StageManagement.SetProgramID(int.Parse(Request.QueryString["ID"].ToString()), int.Parse(ddlProgram.SelectedValue));
        }
    }
}